/**
 * Copyright (c) 2009.kingbi.
 * All rights reserved.
 */

package com.kingbi.system.user.jsfBean;

import java.util.ArrayList;
import java.util.List;

import javax.faces.model.SelectItem;

import com.kingbi.system.user.model.UserModel;
import com.kingbi.util.jsf.ListPageBean;

/**
 * Class description goes here.
 * 
 * Created by Auto Code Produce System User: Date: 20091021 Time: 163526
 */

public class UserDataBean extends ListPageBean {

	private String userId = "";
	private String userName = "";
	private String password = "";
	private String orgId = "";
	
	private String phone = "";
	private String mobile = "";
	private String email = "";
	private String remark = "";
	private String valid = "";

	private String roleCheckbox = "";
	private String roleChecked = "";
	private String oldpassword = "";
	private String queryName ="";
	private String roleCode = "";
	private String roleName = "";
	
	private List<String> roleIds; // --用户角色字符串
	private List<SelectItem> roleIdList = new ArrayList<SelectItem>();

	public List<SelectItem> getRoleIdList() {
		return roleIdList;
	}

	public void setRoleIdList(List<SelectItem> roleIdList) {
		this.roleIdList = roleIdList;
	}


	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getQueryName() {
		return queryName;
	}

	public void setQueryName(String queryName) {
		this.queryName = queryName;
	}

	public String getRoleCheckbox() {
		return roleCheckbox;
	}

	public void setRoleCheckbox(String roleCheckbox) {
		this.roleCheckbox = roleCheckbox;
	}

	public String getRoleChecked() {
		return roleChecked;
	}

	public void setRoleChecked(String roleChecked) {
		this.roleChecked = roleChecked;
	}

	public String getOldpassword() {
		return oldpassword;
	}

	public void setOldpassword(String oldpassword) {
		this.oldpassword = oldpassword;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getValid() {
		return valid;
	}

	public void setValid(String valid) {
		this.valid = valid;
	}

	public UserModel getJsfModel() {
		UserModel userModel = new UserModel();
		userModel.setUserId(this.userId);
		userModel.setUserName(this.userName);
		userModel.setPassword(this.password);
		userModel.setOrgId(this.orgId);
		userModel.setPhone(this.phone);
		userModel.setMobile(this.mobile);
		userModel.setEmail(this.email);
		userModel.setRemark(this.remark);
		userModel.setValid(this.valid);
		return userModel;
	}
	
	public UserDataBean getJsfDataModel(UserDataBean userDataBean) {
		userDataBean.setUserId(this.userId);
		userDataBean.setUserName(this.userName);
		userDataBean.setPassword(this.password);
		userDataBean.setOrgId(this.orgId);
		userDataBean.setPhone(this.phone);
		userDataBean.setMobile(this.mobile);
		userDataBean.setEmail(this.email);
		userDataBean.setRemark(this.remark);
		userDataBean.setValid(this.valid);
		userDataBean.setQueryName(this.queryName);
		return userDataBean;
	}

	public void getJsfDataBean(UserModel theModel) {
		this.setUserId(theModel.getUserId());
		this.setUserName(theModel.getUserName());
		this.setPassword(theModel.getPassword());
		this.setOrgId(theModel.getOrgId());
		this.setPhone(theModel.getPhone());
		this.setMobile(theModel.getMobile());
		this.setEmail(theModel.getEmail());
		this.setRemark(theModel.getRemark());
		this.setValid(theModel.getValid());
	}

	public void getEmptyJsfBean() {
		this.setUserId("");
		this.setUserName("");
		this.setPassword("");
		this.setOrgId("");
		this.setPhone("");
		this.setMobile("");
		this.setEmail("");
		this.setRemark("");
		this.setValid("");
		this.setQueryName("");
	}

	public List<String> getRoleIds() {
		return roleIds;
	}

	public void setRoleIds(List<String> roleIds) {
		this.roleIds = roleIds;
	}

}